package com.abu.crms.service;


import com.abu.crms.vo.UserVO;
import com.abu.crms.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 普通用户表 服务类
 * </p>
 *
 * @author 阿布
 * @since 2021-02-03
 */
public interface UserService extends IService<User> {
    /**
     * 发送邮件
     * @param email
     * @return
     */
    Boolean sendCode(String email);

    /**
     * 用户保存
     * @param user
     * @return
     */
    Boolean saveUser(User user, String code);

    /**
     * 根据学号密码查询
     * @param cardNum
     * @param password
     * @return
     */
    User queryUserInfo(String cardNum, String password);

    Boolean uploadAvator(MultipartFile avatar);

    Boolean sendCodeToPhone(String phone);

    String loginUser(String phone, String code);

    Boolean updateUser(User user,String password);

    UserVO queryUserInfoDetails();


    Boolean sendCodeToEmailOrPhone(String type,String sendTo);

    Boolean resetPwd(String code, String num,String pwd);
}
